<!--{subtemplate jameson_read:touch/header}-->
<div class="header">
  <div class="weui-flex">
    <div class="weui-flex__item header_left">
      <a href="{eval echo mbreurl('author',0);}">
        <i class="fa fa-address-book-o"></i>
      </a>
    </div>
    <div class="weui-flex__item header_title">
      <a href="plugin.php?id=jameson_read&contrl=touchauthor&act=bookedit&book_id={$bookinfo['book_id']}">
      [<!--{$bookinfo['book_name']}-->]
      <!--{if $colum_id}-->
      <!--{lang jameson_read:bianjizhengwen}-->
      <!--{else}-->
      <!--{lang jameson_read:tianjiaxinzhangjie}-->
      <!--{/if}-->
      </a>
    </div>
    <div class="weui-flex__item header_right">
      <a href="{eval echo mbreurl('index',0);}">
        <i class="fa fa-home"></i>
      </a>
    </div>
  </div>
</div>
<form id="columform" action="./plugin.php?id=jameson_read&contrl=touchauthor&act=postzhangjie" method="post" accept-charset="{CHARSET}">
    <div class="weui-cells">
      <div class="weui-cell">
          <div class="weui-cell__hd">
            <label class="weui-label">
              <!--{lang jameson_read:biaoti}-->
            </label>
          </div>
          <div class="weui-cell__bd">
            <input class="weui-input" type="text" placeholder="{lang jameson_read:zaicishuru}{lang jameson_read:biaoti}" id="subject" name="subject" value="{if $cidarray['subject']}{$cidarray['subject']}{/if}" />
          </div>
      </div>
      <!--{if $authorinfo[$authorinfo['setsj']]}-->
      <div class="weui-cell">
          <div class="weui-cell__hd">
            <label class="weui-label">
              <!--{lang jameson_read:shoujia}-->
            </label>
          </div>
          <div class="weui-cell__bd">
            {if $authorinfo['setsj'] == 'zgsj'}
            <input class="weui-input" type="text" placeholder="{lang jameson_read:xiaoyu}{$authorinfo['zgsj']}{$_G['jameson_read']['trametitle']}"  id="price"  name="price" value="{if $cidarray['price']}{$cidarray['price']}{/if}" />
            {else}
              <select  id="price"  name="price">
                <option value="0" {if $cidarray['price']<1} selected {/if}>0</option>
                <option value="{$authorinfo['qzsj']}" {if $cidarray['price']} selected {/if}>{$authorinfo['qzsj']}</option>
              </select>
            {/if}
          </div>
      </div>
      <!--{/if}-->
      <div class="weui-cell">
          <div class="weui-cell__bd">
            <iframe id="editerifame" src="./source/plugin/jameson_read/template/touch/edit.htm?url={$_G['siteurl']}"  style="height: 200px;width: 100%;border:1px solid #dedede;overflow: hidden;"></iframe>
            <textarea onkeyup=""  style="height: 12rem;border:1px solid #eee;padding:0.2rem;" class="weui-textarea none" id="zwmessage" name="message" placeholder="{lang jameson_read:zaicishuru}{lang jameson_read:zhengwen},{lang jameson_read:qingshiyongdiannaoban}">{$message}</textarea>
            <div class="item-input">
              <input type="file" onchange="jameson.bendi(this)" class="mtm" >
            </div>
            <span class="xg1 xs1">jpg,png,gif,mp3,mp4</span>
          </div>
      </div>
    </div>
            <input type="hidden" name="formhash" value="{FORMHASH}" />
            <input type="hidden" name="youxiaozishu" value="0" id="youxiaozishu" />
            <input type="hidden" name="category_id" value="{$bookinfo['category_id']}" />
            <input type="hidden" name="book_id" value="{$bookinfo['book_id']}" />
            <input type="hidden" name="colum_id" value="{$colum_id}" />
            <input type="hidden" name="tid" value="{$tid}" />
            <input type="hidden" name="j_id" value="{$_GET['j_id']}" />
  <div class="weui-btn-area">
          <button type="button" onclick="jameson.tjmessage()" class="weui-btn weui-btn_primary" >
          <!--{lang jameson_read:tijiao}-->
          </button>
    </div>
</form>

<script type="text/javascript">
  window.onmessage=function(e){  
    document.getElementById("zwmessage").value = e.data;
  };
  document.getElementById("editerifame").onload=function(){
    if(document.getElementById("zwmessage").value){
      $("#editerifame").contents().find('body').html(document.getElementById("zwmessage").value);
    }
  };
</script>
<!--{subtemplate jameson_read:touch/footer}-->